<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../org/angular.min.js" ></script>
	</head>
	<body>
		<!--<div ng-app="hd" ng-controller="ctrl">
			<select ng-options="v.value as v.name  for v in data" ng-model="city">
				
			</select>
		</div>
		<script>
			var m = angular.module("hd",[]);
			m.controller('ctrl',['$scope',function($scope){
				$scope.city="111";
				$scope.data = [
				    {name:"111",value:"beijng"},
				    {name:"2111",value:"xian"},
				    {name:"311",value:"nanjiren"}
				];
			}]);
		</script>-->
		<form name="temp_form" ng-app="hd" ng-controller="ctrl">
    <div>学制：
        <select ng-model="a"
                ng-options="v.id as v.name for v in a_data"
                ng-change="a_change(a)">
            <option value=""></option>
        </select>
        <span>{{a_show}}</span>
    </div>
    <div>班级：
        <select ng-model="b"
                ng-options="v.id as v.name group by v.grade for v in b_data"
                ng-change="b_change(b)">
            <option value="">请选择</option>
        </select>
        <span>{{b_show}}</span></div>
</form>





<script type="text/javascript">
    var a2_15 = angular.module("hd", []);
    a2_15.controller("ctrl", ['$scope', function ($scope) {
        $scope.a_data = [
            {id: "1001", name: "小学"},
            {id: "1002", name: "中学"},
            {id: "1003", name: "大学"}
        ];
        $scope.b_data = [
            {id: "1001", name: "(1)班", grade: "一年级"},
            {id: "1002", name: "(2)班", grade: "二年级"},
            {id: "1003", name: "(3)班", grade: "三年级"},
            {id: "1004", name: "(4)班", grade: "四年级"},
            {id: "1005", name: "(5)班", grade: "五年级"}
        ];
        $scope.a = "";
        $scope.b = "";
//        $scope.a_change = function(a){
//            $scope.a_show = "您选择的是："+a;
//        }
//        $scope.b_change = function(b){
//            $scope.b_show = "您选择的是："+b;
//        }
    }]);

</script>

	</body>
</html>
